<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<%@page import="avicit.platform6.core.locale.PlatformLocalesJSTL"%>
<%@page import="java.util.Locale"%>
<%@page import="avicit.platform6.api.session.SessionHelper"%>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.Map"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="avicit.platform6.commons.utils.ViewUtil"%>
<%@ taglib prefix="sec" uri="/WEB-INF/tags/shiro.tld"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>档案用户数据权限设置</title>
<base href="<%=ViewUtil.getRequestPath(request)%>">
<%@page import="avicit.platform6.api.sysshirolog.impl.AfterLoginSessionProcess"%>
<% 
Object lang=session.getAttribute(AfterLoginSessionProcess.SESSION_CURRENT_LANGUAGE_CODE);
String languageCode="zh_CN";
if(lang!=null){
	languageCode=lang.toString();
}
	Locale locale =SessionHelper.getLocaleByUser(request);
%>
<link href="static/css/custom/lantop/css/custom.css" type="text/css"  rel="stylesheet">
<jsp:include page="/avicit/platform6/component/common/EasyUIJsInclude.jsp"></jsp:include>
<script type="text/javascript" src="avicit/im/lantop/userauthset/IframeArchiveServiceUserSet.js"></script>
<jsp:include page="/avicit/platform6/modules/system/commonpopup/commonSelectionHead.jsp"></jsp:include>
<jsp:include page="/avicit/im/common/ImUIJSCSSInclude.jsp"></jsp:include>
<script type="text/javascript" src="avicit/im/lantop/userauthset/locale/language_<%=languageCode%>.js"></script>
<script type="text/javascript" src="static/js/platform/index/js/divscroll.js" ></script>
<script type="text/javascript">
	targetId = "${targetId}";	//所选授权维度ID
	authCount = "${authCount}";
	   $(function(){
			$(".datagrid-view2").find(".datagrid-body").perfectScrollbar();
			
	   });
</script>
<style>
.datagrid-cell{
   height:22px !important;
}
.selbtnc{
margin-top:5px !important;
}
</style>
</head>
<body id="myBody" class="easyui-layout">
    <%-- 用户选择 --%>
    <%-- <div data-options="region:'center',title:'<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userSelect","i18n.lantop",locale)%>',split:true"> --%>
		<!-- 用户选择 begin -->
		<%-- <div id="toolbar_h" style="height: 66px;"></div>
    	<table id="userDatagrid" class="easyui-datagrid"
			data-options="
						animate: false,
						collapsible: false,
						fitColumns: true,
						scrollbarSize:0,
						autoRowHeight: false,
						singleSelect: true,
						pagination:true,
						pageNumber:0,
						pageSize:20, 
						pageList:[20,30,50],
			    		striped:true,
						fit:true,
						method: 'post',
						toolbar:'#toolbar_h',
						onClickRow: userOnClickRow,
						onLoadSuccess: userOnLoadSuccess
					">
			<thead>
				<tr>
					<sec:accesscontrollist hasPermission="3" domainObject="userauthset_IframeArchiveServiceUserSet_userDatagrid_id">
						<th data-options="field:'ID', halign:'center',checkbox:true, hidden:true" title="主键ID" width="20">主键ID</th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3" domainObject="userauthset_IframeArchiveServiceUserSet_userDatagrid_name">
						用户
						<th
							data-options="field:'NAME', halign:'center', align:'center', sortable:false,editor:{type:'text'}"
							width="200" title="用户"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userSelect.table.user","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3" domainObject="userauthset_IframeArchiveServiceUserSet_userDatagrid_deptName">
						部门
						<th
							data-options="field:'DEPT_NAME', halign:'center', align:'center', sortable:false,editor:{type:'text'}"
							width="200" title="部门"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userSelect.table.dept","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3" domainObject="userauthset_IframeArchiveServiceUserSet_userDatagrid_roleName">
						角色
						<th
							data-options="field:'ROLE_NAME', halign:'center', align:'center', sortable:false,editor:{type:'text'}"
							width="200" title="角色"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userSelect.table.part","i18n.lantop",locale)%></th>
					</sec:accesscontrollist>
				</tr>
			</thead>
		</table> --%>
    	<!-- 用户选择 end -->
  <!--   </div> -->
    <%-- 用户权限设置 --%>
    <div data-options="region:'center',title:'<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset","i18n.lantop",locale)%>',split:true" style="width:530px;">
        <!-- 权限服务 begin -->
	    <div id="toolbarUserAuth" class="datagrid-toolbar" style="height: auto;padding:5px 10px 10px; width:auto; display: block;">
			<%-- <sec:accesscontrollist  hasPermission="3" domainObject ="userauthset_IframeArchiveServiceUserSet_button_saveUserSetDataAuth">
				<td width="50px;"><a title="保存" class="easyui-linkbutton" iconCls="icon-im-save" plain="true" onclick="saveUserSetDataAuth();" href="javascript:void(0);">保存</a></td>
			</sec:accesscontrollist> --%>
			<sec:accesscontrollist  hasPermission="3" domainObject ="userauthset_IframeArchiveServiceUserSet_button_addQualification">
				<%-- 添加条件 --%>
				<td width="50px;">
				<a title="<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.addCondition","i18n.lantop",locale)%>" class="easyui-linkbutton  selbtnc" iconCls="icon-im-add"  onclick="addQualification();" href="javascript:void(0);">
				添加
				</a></td>
			</sec:accesscontrollist>
			<sec:accesscontrollist  hasPermission="3" domainObject ="userauthset_IframeArchiveServiceUserSet_button_editQualification">
				<%-- 编辑条件 --%>
				<td width="50px;"><a title="<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.editCondition","i18n.lantop",locale)%>" class="easyui-linkbutton selbtnc" iconCls="icon-im-edit"  onclick="editQualification();" href="javascript:void(0);">编辑</a></td>
			</sec:accesscontrollist>
			<sec:accesscontrollist  hasPermission="3" domainObject ="userauthset_IframeArchiveServiceUserSet_button_delQualification">
				<%-- 删除条件 --%>
				<td width="50px;"><a title="<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.deleteCondition","i18n.lantop",locale)%>" class="easyui-linkbutton selbtnc" iconCls="icon-im-remove"  onclick="delQualification();" href="javascript:void(0);">删除</a></td>
			</sec:accesscontrollist>
			<sec:accesscontrollist  hasPermission="3" domainObject ="userauthset_IframeArchiveServiceUserSet_button_batchOperateAuthSet">
				<%-- 批量设置操作权限 --%>
				<td width="50px;"><a title="<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.batchSetOperateLimit","i18n.lantop",locale)%>" class="easyui-linkbutton selbtnc" iconCls="icon-im-newnbatchsetauth"  onclick="batchOperateAuthSet();" href="javascript:void(0);"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.batchSetOperateLimit","i18n.lantop",locale)%></a></td>
			</sec:accesscontrollist>
			<sec:accesscontrollist  hasPermission="3" domainObject ="userauthset_IframeArchiveServiceUserSet_button_entryAuthSet">
				<%-- 条目权限设置 --%>
				<td width="50px;"><a title="<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.entryAuthSet","i18n.lantop",locale)%>" class="easyui-linkbutton  selbtnc" iconCls="icon-im-newrecordauthset"  onclick="entryAuthSet();" href="javascript:void(0);"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.entryAuthSet","i18n.lantop",locale)%></a></td>
			</sec:accesscontrollist>
			<sec:accesscontrollist  hasPermission="3" domainObject ="userauthset_IframeArchiveServiceUserSet_button_delAuthSet">
				<%-- 删除权限 --%>
				<td width="50px;"><a title="<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.deleteAuth","i18n.lantop",locale)%>" class="easyui-linkbutton selbtnc" iconCls="icon-im-remove"  onclick="delAuthSet();" href="javascript:void(0);"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.deleteAuth","i18n.lantop",locale)%></a></td>
			</sec:accesscontrollist>
			<sec:accesscontrollist  hasPermission="3" domainObject ="userauthset_IframeArchiveServiceUserSet_button_copyQualification">
				<%-- 条件复制 --%>
				<td width="50px;"><a title="<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.conditionCopy","i18n.lantop",locale)%>" class="easyui-linkbutton  selbtnc" iconCls="icon-im-copy"  onclick="copyQualification();" href="javascript:void(0);"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.conditionCopy","i18n.lantop",locale)%></a></td>
			</sec:accesscontrollist>
			<%-- <sec:accesscontrollist  hasPermission="3" domainObject ="userauthset_IframeArchiveServiceUserSet_button_copyAuth">
				权限复制
				<td width="50px;"><a title="<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.authCopy","i18n.lantop",locale)%>" class="easyui-linkbutton  selbtnc" iconCls="icon-im-copy"  onclick="copyAuth();" href="javascript:void(0);"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.button.authCopy","i18n.lantop",locale)%></a></td>
			</sec:accesscontrollist> --%>
		</div>
			<table id="userAuthTreegrid" class="easyui-treegrid"
				data-options="
							rownumbers: false,
							animate: true,
							fit:true,
							fitColumns: true,
							scrollbarSize:0,
							autoRowHeight: false,
							method: 'get',
							idField: 'ID',
							treeField: 'ARCHIVE_CLASS_NODE_NAME',
							singleSelect: false,
							toolbar:'#toolbarUserAuth',
							selectOnCheck: false,
							checkOnSelect: false,
							singleSelect: true
						">
						<!-- ,
							onUnselect: userAuthUnSelect,
							onLoadSuccess: userAuthOnLoadsuccess,
							onCheck : userAuthOnCheck,
							onUncheck : userAuthOnUnCheck -->
				<thead>
					<tr>
						<sec:accesscontrollist hasPermission="3" domainObject="userauthset_IframeArchiveServiceUserSet_userAuthTreegrid_id">
							<th data-options="field:'ID', halign:'center',checkbox:true" title="主键ID" width="20">主键ID</th>
						</sec:accesscontrollist>
						<sec:accesscontrollist hasPermission="3" domainObject="userauthset_IframeArchiveServiceUserSet_userAuthTreegrid_EditCondition">
							<%-- 条件权限 --%>
							<th data-options="field:'DATA_AUTH', halign:'center', align:'center', sortable:false,editor:{type:'text'},formatter:formatEditCondition"
								width="100" title="条件权限"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.table.conditionOperate","i18n.lantop",locale)%></th>
						</sec:accesscontrollist>
						<sec:accesscontrollist hasPermission="3" domainObject="userauthset_IframeArchiveServiceUserSet_userAuthTreegrid_archiveClassNodeName">
							<%-- 节点名称 --%>
							<th data-options="field:'ARCHIVE_CLASS_NODE_NAME', halign:'center', align:'left !important', sortable:false,editor:{type:'text'}"
								width="300" title="节点名称"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.table.nodeName","i18n.lantop",locale)%></th>
						</sec:accesscontrollist>
						<c:forEach var="rowCol" items="${userAuthColList}" >
							<c:if test="${rowCol.code != 'A3'}">
								<sec:accesscontrollist hasPermission="3" domainObject="_${rowCol.code}">
									<th data-options="field:'${rowCol.code}', halign:'center', align:'center', sortable:false,editor:{type:'text'},formatter:formatCheckbox"
										width="100" title="${rowCol.name}">${rowCol.name}</th>
								</sec:accesscontrollist>
							</c:if>
						</c:forEach>
							
						<sec:accesscontrollist hasPermission="3" domainObject="userauthset_IframeArchiveServiceUserSet_userAuthTreegrid_relTargetName">
							<%-- 设置操作权限 --%>
							<th data-options="field:'REL_TARGET_NAME', halign:'center', align:'center', sortable:false,editor:{type:'text'},formatter:formatOperateRoleSet"
								width="200" title="设置操作权限"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.userauthset.userauthset.table.setOperateAuth","i18n.lantop",locale)%></th>
						</sec:accesscontrollist>
					</tr>
				</thead>
			</table>
			<div id="treeMenu" class="easyui-menu" style="width:120px;">
				<div id="addTmll" onclick="saveAuth('1,0,0,0')" iconCls="icon-im-add">设置条目浏览</div>
				<div id="delTmll" onclick="saveAuth('0,0,0,0')" iconCls="icon-im-remove">取消条目浏览</div>
				<div id="tmllMenuSep" class="menu-sep"></div>
				<div id="addQwll" onclick="saveAuth('1,1,0,0')" iconCls="icon-im-add">设置全文浏览</div>
				<div id="delQwll" onclick="saveAuth('1,0,0,0')" iconCls="icon-im-remove">取消全文浏览</div>
				<div id="qwllMenuSep" class="menu-sep"></div>
				<!-- <div id="addQwdy" onclick="saveAuth('1,1,1,0')" iconCls="icon-im-add">设置全文打印</div>
				<div id="delQwdy" onclick="saveAuth('1,1,0,0')" iconCls="icon-im-remove">取消全文打印</div>
				<div id="qwdyMenuSep" class="menu-sep"></div> -->
				<div id="addQwxz" onclick="saveAuth('1,1,1,1')" iconCls="icon-im-add">设置全文下载</div>
				<div id="delQwxz" onclick="saveAuth('1,1,1,0')" iconCls="icon-im-remove">取消全文下载</div>
			</div>
	</div>
</body>
</html>
